<?php 
//Lay thong tin cua mot tin bai
$v_form_name="f_dsp_single_qa_question_for_sending";
$v_url = "index.php";
$v_qa_cate_id = 0;
if(isset($_REQUEST['hdn_qa_cate_id'])){
	$v_qa_cate_id = $_REQUEST['hdn_qa_cate_id'];
}
$v_cate_id = 0;
$v_agency_id = 0;
$v_qa_question_content = ''; 
$v_fuseaction_back = ''; 
$v_back = 1; 

// Goi thu tuc xu ly khi xoa cac file moi them (chua submit)
$v_goto_url_for_delete_file = "javascript:delete_row_qa(document.all.tr_line_new,document.f_dsp_single_qa_question_for_sending.chk_file_attach_new_id,document.f_dsp_single_qa_question_for_sending.hdn_deleted_new_file_id_list);";
// Goi thu tuc de them moi dong
$v_goto_url_for_add_file = "javascript:add_row(document.all.tr_line_new," . CONST_QA_FILE_MAXLENGTH .");";
?>

<table width="100%" class="qa_question_table" cellpadding="0" cellspacing="0">
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td class="normal_title"><?php echo CONST_QA_QUESTION_FOR_ADDITION_TITLE; ?></td>
	</tr>
</table>
<!--bang chua tieu de cua form-->
<form action="index.php" method="post" name=<? echo $v_form_name;?> enctype="multipart/form-data">
<table width="99%" class="form_table1" cellpadding="0" cellspacing="0" border="0">

	<tr>
		<input type="hidden" name="fuseaction" value="DISPLAY_SINGLE_QA_QUESTION_FOR_SENDING">
		<input type="hidden" name="hdn_fusecaction" value="<? echo $v_fuseaction_back;?>">
		<input type="hidden" name="hdn_qa_cate_id" value="<?php echo $v_qa_cate_id;?>">	
		<input type="hidden" name="hdn_cate_id" value="<?php echo $v_cate_id;?>">	
		<input type="hidden" name="hdn_agency_id" value="<?php echo $v_agency_id;?>">
		<input type="hidden" name="hdn_status" value="<?php echo $v_status;?>">		
  <tr>
		<td class="normal_label">
			<?php echo CONST_CHOISE_AGENCY_LABEL;?>
		</td>
		<td colspan="3">
			<select class="normal_selectbox" name="sel_agency" style="width:85%" message = "<?php echo CONST_AGENCY_MESSAGE; ?>" onChange="sel_onclick_qa(f_dsp_single_qa_question_for_sending.hdn_agency_id,f_dsp_single_qa_question_for_sending.sel_agency);">
            <option id="" value="">--<?php echo CONST_AGENCY_NAME_LABEL;?>--</option>
            <?php echo _generate_select_option($arr_all_agency,'0','0','2', $v_agency_id);?>
          </select>
		</td>  
  </tr>

    <tr>
		<td class="normal_label"><?php echo CONST_CHOISE_CATE_LABEL;?></td>
		<td colspan="3">
			<select class="normal_selectbox" name="sel_cate" style="width:85%" message = "<?php echo CONST_CATE_MESSAGE; ?>" onChange="sel_onclick_qa(f_dsp_single_qa_question_for_sending.hdn_cate_id,f_dsp_single_qa_question_for_sending.sel_cate);">
            <option id="" value="">--<?php echo CONST_CATE_NAME_LABEL;?>--</option>
            <?php echo _generate_select_option($arr_all_cate,'0','0','2', $v_cate_id);?>
          </select>
		</td>
  </tr>
  <tr>
  		<td class="normal_label"><?php echo CONST_CHOISE_STATUS_LABEL;?></td>
		<td colspan="3">
          <select class= "normal_selectbox"  style="width:85% "name = "cbo_status" onChange="sel_onclick_qa(f_dsp_single_qa_question_for_sending.hdn_status,f_dsp_single_qa_question_for_sending.cbo_status);" optional = "<?php echo CONST_AF_STATUS_OPTIONAL; ?>">
            <option id="-1",value="-1">--------<?php echo CONST_STATUS_NAME_LABEL ?>--------</option>
            <? echo _generate_select_option($arr_all_status,"0","0","1", $v_status);?>
          </select>
		</td>
  </tr>
  <tr>
		<td class="normal_label"><?php echo CONST_START_DATE_LABEL; ?> </td>	    
		<td>
			<input name ="txt_start_date" type="text" class="normal_textbox" readonly size="7" >
			<img src="<?php echo $_ISA_IMAGE_URL_PATH;?>calendar.gif" border="0" onClick="DoCal('<?php echo $_ISA_LIB_URL_PATH; ?>isa-calendar/',document.f_dsp_single_qa_question_for_sending.txt_start_date)" style="cursor:hand">
		</td>
		<td class="normal_label"><?php echo CONST_FINSH_DATE_LABEL; ?> </td>	    
		<td>
			<input name ="txt_finsh_date" type="text" class="normal_textbox" readonly  size="7">
			<img src="<?php echo $_ISA_IMAGE_URL_PATH;?>calendar.gif" border="0" onClick="DoCal('<?php echo $_ISA_LIB_URL_PATH; ?>isa-calendar/',document.f_dsp_single_qa_question_for_sending.txt_finsh_date)" style="cursor:hand">
		</td>
 </tr>
 <tr>
    <td class="normal_label"><?php echo CONST_QA_CONTENT_FILTER_LABEL;?></td>
    <td colspan="10">
      <input type="text"  name="txt_content" class="normal_textbox" style="width:85%" value="" optional="<? echo CONST_QA_SEND_WEBSITE_OPTIONAL; ?>" onKeyDown="change_focus(document.f_dsp_single_qa_question_for_sending,this)">
    </td>
 </tr>
 <tr>
    <td>&nbsp;</td>
 </tr>
</table>					
<!--bang chua cac button-->
<table width="100%" >
	<tr>
		<td align="center" width="100%" height="40" valign="bottom">
			<input type="button" name="btn_search"  class="normal_button" value="<?php echo CONST_SEARCH_ADDITON_BUTTON;?>" onClick="btn_save_onclick_qa('SENDING_QA_QUESTION');" onKeyDown="change_focus(document.f_dsp_single_qa_question_for_sending,this)">
		</td>
	</tr>
</table>					
</form>
<script language="javascript">
	function sel_onclick_qa(p_hidden_obj,p_select_obj) {
		p_hidden_obj.value = p_select_obj.value;
		//alert('dd'+p_hidden_obj.value);		
	}
</script>